/*
 * @Author: wuqingchun
 * @Date: 2024-10-29 20:33:59
 * @Description: 
 * @LastEditors: wuqingchun
 * @LastEditTime: 2024-10-30 11:22:59
 */

#ifndef __NET_CONNECTION_HELPER_H__
#define __NET_CONNECTION_HELPER_H__

#include "net_connection_active.h"
#include "net_connection_listener.h"
#include "net_connection_passive.h"

class CNetConnectionHelper
{
public:
    static CNetConnectionActive* CreateActive(INetEventHandler* pobjEventHandler, INetTCPConnectionCallback* pobjCallback, const sockaddr_in *pstAddr);
    static CNetConnectionListener* CreateListener(INetEventHandler* pobjEventHandler, INetTCPConnectionCallback* pobjCallback, const sockaddr_in *pstAddr);
    static CNetConnectionPassive* CreatePassive(INetEventHandler* pobjEventHandler, INetTCPConnectionCallback* pobjCallback, const sockaddr_in *pstAddr, int iListenerFd);
};

#endif //__NET_CONNECTION_HELPER_H__